function [NumberofInputNeurons,NumberofTrainingData,number_class,T, P] = Generate_T_P(Elm_Type, train_data)
    %%%%%%%%%%% Macro definition
    REGRESSION = 0;
    CLASSIFIER = 1;

    %%%%%%%%%%% Load training dataset
    T = train_data(:,1)';
    P = train_data(:,2:size(train_data,2))';

    NumberofTrainingData = size(P,2);
    NumberofInputNeurons = size(P,1);

    if Elm_Type ~= REGRESSION
        %%%%%%%%%%% Preprocessing the data of classification
        sorted_target = sort(T,2);
        label = zeros(1,1); % Find and save in 'label' class label from training and testing data sets
        label(1,1) = sorted_target(1,1);
        j=1;
        for i = 2:NumberofTrainingData
            if sorted_target(1,i) ~= label(1,j)
                j=j+1;
                label(1,j) = sorted_target(1,i);
            end
        end
        number_class = j;
        NumberofOutputNeurons = number_class;% 类别数量

        %%%%%%%%%% Processing the targets of training
        temp_T = zeros(NumberofOutputNeurons, NumberofTrainingData);
        for i = 1:NumberofTrainingData
            for j = 1:number_class
                if label(1,j) == T(1,i)
                    break; 
                end
            end
            temp_T(j,i) = 1;
        end
        T = temp_T * 2 - 1;
    end
end
